package com.neuedu.weishi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.util.Date;

/**
 * Author lu
 * Date  2025-08-26 09:11:00
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Alias("video")
@TableName(value = "video")
public class Video implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键自增长
     */
    @TableField(value = "video_id")
    @TableId(type = IdType.AUTO)
    private Integer videoId;

    /**
     * 所属分类ID
     */
    @TableField(value = "category_id")
    private Integer categoryId;
    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;
    /**
     * 描述
     */
    @TableField(value = "description")
    private String description;
    /**
     * 视频封面图片相对或绝对URL
     */
    @TableField(value = "cover_image")
    private String coverImage;
    /**
     * 视频文件相对或绝对的路径
     */
    @TableField(value = "video_path")
    private String videoPath;
    /**
     * 用于搜索
     */
    @TableField(value = "tags")
    private String tags;
    /**
     * 发布时间
     */
    @TableField(value = "publish_time")
    private Date publishTime;
    /**
     * 发布会员ID
     */
    @TableField(value = "member_id")
    private Integer memberId;
    /**
     * 单位秒
     */
    @TableField(value = "duration")
    private Integer duration;
    /**
     * 1:未审核;2:已通过;9:未通过
     */
    @TableField(value = "review_status")
    private Integer reviewStatus;
    /**
     * 1:未发布;2:发布中;3:已下架
     */
    @TableField(value = "video_status")
    private Integer videoStatus;
    /**
     * 视频所属会员
     */
    @TableField(exist = false)
    private Member member;
    /**
     * 视频所属分类
     */
    @TableField(exist = false)
    private VideoCategory category;
}